/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/**
 * @Title: Document.java
 * @Package phoenics.apeak.crawl
 * @Description
 * @author phoenics@126com
 * @date 2016-1-30 16:01:30
 * @version V1.0
 */
package phoenics.apeak.crawl;



import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.eclipse.jetty.client.api.Response.Listener;
import org.springframework.context.ApplicationContext;


// TODO: Auto-generated Javadoc
/**
 * The Class Document.
 *
 * @Description The Class Document.
 */
public   class Document {
	
	/** The Constant headSelects. */
	public final static Map<HttpHead,List<String>> headSelects=new ConcurrentHashMap<>();
 	
	 /** The url. */
	 private String url;
 	
	 /** The params. */
	 private String params;
 	
	 /** The listener. */
	 private Listener listener;
 	
	 /** The application context. */
	 private ApplicationContext applicationContext;
 	
	 /** The extractor class. */
	 private Class<? extends Extractor> extractorClass;
	 
 	/** The repeat. */
 	private boolean repeat =false;
	 //连接的最后错误处理标志
	 /** The deal with. */
 	private boolean dealWith =false;
 	
 	/** The head. */
 	private Map<HttpHead ,String> head=new HashMap<>();
 	

	/**
 * Gets the url.
 *
 * @return the url
 * @Description Gets the url.
 */
	public String getUrl() {
		return url;
	}

	/**
 * Sets the url.
 *
 * @param url
 *            the new url
 * @Description Sets the url.
 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
 * Gets the params.
 *
 * @return the params
 * @Description Gets the params.
 */
	public String getParams() {
		return params;
	}

	/**
 * Sets the params.
 *
 * @param params
 *            the new params
 * @Description Sets the params.
 */
	public void setParams(String params) {
		this.params = params;
	}

	/**
 * Gets the head.
 *
 * @return the head
 */
	public Map<HttpHead ,String> getHead() {
		return head;
	}

	/**
 * Checks if is repeat.
 *
 * @return true, if is repeat
 * @Description Checks if is repeat.
 */
	public boolean isRepeat() {
		return repeat;
	}

	/**
 * Sets the repeat.
 *
 * @param repeat
 *            the new repeat
 * @Description Sets the repeat.
 */
	public void setRepeat(boolean repeat) {
		this.repeat = repeat;
	}

	/**
 * Checks if is deal with.
 *
 * @return true, if is deal with
 * @Description Checks if is deal with.
 */
	public boolean isDealWith() {
		return dealWith;
	}

	/**
 * Sets the deal with.
 *
 * @param dealWith
 *            the new deal with
 * @Description Sets the deal with.
 */
	public void setDealWith(boolean dealWith) {
		this.dealWith = dealWith;
	}

	/**
 * Gets the listener.
 *
 * @return the listener
 * @Description Gets the listener.
 */
	public Listener getListener() {
		return listener;
	}

	/**
 * Sets the listener.
 *
 * @param listener
 *            the new listener
 * @Description Sets the listener.
 */
	public void setListener(Listener listener) {
		this.listener = listener;
	}

	/**
 * Gets the application context.
 *
 * @return the application context
 * @Description Gets the application context.
 */
	public ApplicationContext getApplicationContext() {
		return applicationContext;
	}

	/**
 * Sets the application context.
 *
 * @param applicationContext
 *            the new application context
 * @Description Sets the application context.
 */
	public void setApplicationContext(ApplicationContext applicationContext) {
		this.applicationContext = applicationContext;
	}

	/**
 * Gets the extractor class.
 *
 * @return the extractor class
 */
	public Class<? extends Extractor> getExtractorClass() {
		return extractorClass;
	}

	/**
 * Sets the extractor class.
 *
 * @param extractorClass
 *            the new extractor class
 * @Description Sets the extractor class.
 */
	public void setExtractorClass(Class<? extends Extractor> extractorClass) {
		this.extractorClass = extractorClass;
	}

	

}
